import { RawAxiosRequestHeaders } from 'axios'

export type AxiosMethod = 'get' | 'post' | 'delete' | 'put'

export type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'

export interface AxiosConfig {
    params?: any
    data?: any
    url: string
    method?: AxiosMethod
    headers?: RawAxiosRequestHeaders
    responseType?: AxiosResponseType
}

export interface IResponse<T = any> {
    code: number
    data: T extends any ? T : T & any
}
